uniform sampler2D tex;

varying vec4 pos;

void main() {
	vec4 texel = texture2D(tex, gl_TexCoord[0].st);
	float randf = 
		fract( // [0, 1]
			sin(
				dot(
					pos.xyz, 
					vec3(12.9898, 78.233, 18.78765)
				)
			) * 43758.5453
		);
	randf = 1.0 - randf * 0.2; // randf an element of [0.93, 1.0]
	texel.r *= randf;
	texel.g *= randf;
	texel.b *= randf;
	gl_FragColor = texel;
}